<template>
  <div class="min-card">
    <div class="min-card-top">
      <div class="text">{{ title }}</div>
    </div>
    <div class="min-card-bottom">
      <slot name="chart"></slot>
    </div>
  </div>
</template>

<script setup lang="ts" name="minChartCard">
defineProps({
  title: {
    type: String,
    default: ""
  }
});
</script>

<style scoped lang="scss">
.min-card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 16px 24px;
  border: 1px solid var(--el-header-menu-shadow-color);
  border-radius: 4px;
  .min-card-top {
    height: 30px;
    overflow: hidden;
    font-size: 16px;
    font-weight: 700;
    line-height: 30px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .min-card-bottom {
    flex: 1;
    min-height: 0;
  }
}
</style>
